package com.divemotor.ventarepuestosinternet.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.divemotor.ventarepuestosinternet.dao.TipoVehiculoDAO;
import com.divemotor.ventarepuestosinternet.exception.DivemotorBusinessException;
import com.divemotor.ventarepuestosinternet.model.TipoVehiculo;
import com.divemotor.ventarepuestosinternet.service.TipoVehiculoService;

@Service(value = "tipoVehiculoService")
@Transactional(rollbackFor=Exception.class)
public class TipoVehiculoServiceImpl implements TipoVehiculoService, Serializable {

	private static final long serialVersionUID = -408079477653675512L;
	
	@Autowired
	private TipoVehiculoDAO tipoVehiculoDAO;

	@Override
	public List<TipoVehiculo> listar() throws DivemotorBusinessException {
		return tipoVehiculoDAO.listar();
	}
	
	@Override
	public TipoVehiculo obtenerPorCodigo(TipoVehiculo tipoVehiculo) throws DivemotorBusinessException {
		return tipoVehiculoDAO.obtenerPorCodigo(tipoVehiculo);
	}

}
